{extend name="layout" /} 
{block name="main-content"}

<div class="x12">
	{include file="auth/group"}
	<div class="panel x9 x1-move">
		<div class="panel-head"><?=input('get.group_name')?> 用户分配</div>
		<div class="panel-body no-padding">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>UID</th>
						<th>用户名</th>
						<th>昵称</th>
						<th>最后登录时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<?php
						if(empty($users)){
							echo '<tr><td colspan="6">暂未分配用户</td></tr>';
						}else{
							foreach($users as $user){
					?>
						<tr>
							<td><?=$user['uid']?></td>
							<td><?=$user['username']?></td>
							<td><?=$user['nickname']?></td>
							<td><?=date('Y-m-d',$user['last_login_time'])?></td>
							<td><?=int2String($user['status'])?></td>
							<td><a href="{:url('deleteGroupUser',['uid'=>$user['uid'],'group_id'=>input('group_id')])}"><i class="icon-trash-o" title="删除"></i></a></td>
						</tr>
					<?php }} ?>
				</tbody>

			</table>
		</div>
		<div class="panel-foot text-right">
			<form method="post" action="{:url('addUserToGroup',['group_id'=>input('group_id')])}" class="pull-right">
				<div class="input-inline clearfix ">
					<input class="button" type="button" value="UID" />
					<input type="uid" class="input"   id="select_uid" size="20" placeholder="请输入用户ID" />
					<input type="submit" class="button" value="加入组" />
				</div>

			</form>
		</div>
		
	</div>
	<table class="table" id="select_uid_table"></table>
</div>

{/block}
{block name="js"}
	<script type="text/javascript">seajs.use(['css','admin/js/auth'], function() {seajs.use('admin/css/rule.css');})</script>
{/block}
